SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[usp_ShowApplyingRecordsCompany]

	(
	@param_UserId NVARCHAR(50)
	)

AS
	/* SET NOCOUNT ON */
	
	SELECT dbo.JOL_Recruitment_ApplyingRecords.id,position,applicant_type,result
	FROM dbo.JOL_Recruitment_ApplyingRecords,dbo.JOL_Recruitment_Position,dbo.JOL_Recruitment_Participants_apply,dbo.JOL_Employer
	WHERE
	recruit_position=dbo.JOL_Recruitment_Position.id AND
	 participants_apply=dbo.JOL_Recruitment_Participants_apply.id AND 
	 employing_unit=JOL_Employer_No AND 
	 JOL_Employer_Account=@param_UserId
	ORDER BY
	dbo.JOL_Recruitment_ApplyingRecords.update_time,dbo.JOL_Recruitment_ApplyingRecords.add_time DESC
	
	RETURN
GO
